<template>
	<view>
		<view class="index-bj">
			<image :src="info.pic" mode=""></image>
		</view>
		<view class="btn" @click="handleSkip">
			跳过
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{},
				time:null
			};
		},
		onLoad() {
			this.ptConfigFn()
		},
		methods:{
			handleSkip(){
				clearTimeout(this.time)
				let uid = uni.getStorageSync('uid')
				this.switchTab('/pages/tabs/home')
			},
			async ptConfigFn(){
				let res = await this.$request('content/pic',{type:3})
				if(res.result == '0'){
					this.info = res.data
					let uid = uni.getStorageSync('uid')
					this.time = setTimeout(()=>{
						this.switchTab('/pages/tabs/home')
					},3000)
				}
			}
		},
	}
</script>

<style lang="scss" scoped> 
	.index-bj{
		width: 100%;
		height: 100vh;
		image{
			width: 100%;
			height: 100%;
			display: block;
		}
	}
	.btn{
		position: fixed;
		top: 190rpx;
		right: 30rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		text-decoration: underline;
		color: #222222;
		line-height: 36rpx;
	}
</style>
